package com.ruoyi.web.controller.system;

import com.ruoyi.system.service.IExamPaperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 *
 * @auther: huangjianfeng
 * @Date: 2020/11/6
 * @Time: 14:02
 * Description:
 */
@Controller
public class IndexController {

    @Autowired
    private IExamPaperService iExamPaperService;

//    @RequestMapping(value = "index")
//    @ResponseBody
//    public String index(){
//        return "sucess";
//    }

    @RequestMapping("/index")
    public String home(Map<String,Object> map){
        map.put("list",iExamPaperService.getAllExamPaper(0));
        return "paper/home";
    }

    @RequestMapping("/me")
    public String kownMe(Map<String,Object> map) {
        List<String> list = new ArrayList<String>();
        list.add("鸟不拉屎：一个正在努力Coding的未来架构师");
        list.add("记录菜鸟的成长");
        list.add("个人博客：https://niaobulashi.com");
        list.add("github博客：https://niaobulashi.github.io");
        map.put("msg", "Yoyoyoyoyo");
        map.put("images", "Yoyoyoyoyo");
        map.put("lists", list);
        return "me";
    }

}
